#ifndef __ICAM_H__
#define __ICAM_H__

#include "data_type.h"

#define debug_printf                    printf

#define ICAM_CMD_MAGIC                 "iCam"
#define ICAM_MAX_NODE_NUM               1000

#define ICAM_NET_SOURCE_PORT            6116
#define ICAM_NET_REGISTRY_NAME          "192.168.0.200"
#define ICAM_NET_REGISTRY_PORT          8116

#define VIEWER_NET_SOURCE_PORT          7788
#define VIEWER_NET_REGISTRY_NAME        "192.168.0.200"
#define VIEWER_NET_REGISTRY_PORT        8117

#define ICAM_MAX_CMD_SIZE               512
#define ICAM_MAX_CMD_HEAD_SIZE          12

#define ICAM_CMD_UPDATE_BEACON          1
#define ICAM_CMD_FIND_ICAM              2
#define ICAM_CMD_ICAM_NOT_LOGON         3
#define ICAM_CMD_ICAM_LOG_INFO          4
#define ICAM_CMD_VIEWER_INFO            5
#define ICAM_CMD_TEST_DATA              6

typedef int SOCKET;

typedef struct _t_icam_reg_infor
{
    time_t log_time;
    INT32U s_addr;    
    INT16U sin_port;
} t_icam_reg_infor;

typedef struct _t_icam_cmd
{
    INT8U magic[4];
    INT32U cmd_id;
    INT32U payload_length;
    INT8U buf[ICAM_MAX_CMD_SIZE - 12];
} t_icam_cmd;



#endif  // __ICAM_H__
